package com.topisv.tms.repository.work.ExceptionOrder;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.work.ExceptionOrder.ExceptionOrder;

/**
 * 异常单细_DAO
 * @author ch
 *
 */
public abstract interface ExceptionOrderDao extends PagingAndSortingRepository<ExceptionOrder, Long>, JpaSpecificationExecutor<ExceptionOrder>
{

	@Query("select t from ExceptionOrder t where orderno=?")
	ExceptionOrder loadByOrderno(String orderno);

	@Query("select t from ExceptionOrder t where orderno=?1 or customerOrderno=?1 or fromOrderno=?1 ")
	ExceptionOrder loadByAnyOrderno(String orderno);


}